package com.atguigu.gmall.payment.service;

import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.model.payment.PaymentInfo;

import java.util.HashMap;

/**
 * @author atguigu-mqx
 */
public interface PaymentService {

    //  记录支付交易 返回值，参数列表！
    //  目前制作一种：支付宝！
    void savePaymentInfo(OrderInfo orderInfo,String paymentType);

    /**
     * 查询paymentInfo
     * @param outTradeNo
     * @param name
     * @return
     */
    PaymentInfo getPaymentInfo(String outTradeNo, String name);

    /**
     * 更新数据
     * @param outTradeNo
     * @param paymentType
     * @param paramMap
     */
    void paySuccess(String outTradeNo, String paymentType, HashMap<String, String> paramMap);

    /**
     * 更新数据
     * @param outTradeNo
     * @param paymentType
     * @param paymentInfoUpd
     */
    void updatePaymentInfo(String outTradeNo, String paymentType, PaymentInfo paymentInfoUpd);

    /**
     *
     * @param orderId
     */
    void closePayment(Long orderId);

}
